package com.plugin.install

import android.app.Activity
import android.content.Context
import app.tauri.annotation.Command
import app.tauri.annotation.InvokeArg
import app.tauri.annotation.TauriPlugin
import app.tauri.plugin.JSObject
import app.tauri.plugin.Plugin
import app.tauri.plugin.Invoke

@InvokeArg
class InstallArgs {
  var path: String = ""
}

@TauriPlugin
class ExamplePlugin(private val activity: Activity): Plugin(activity) {
    private val implementation = Example()

    @Command
    fun install(invoke: Invoke) {
        val context: Context = activity
        val args = invoke.parseArgs(InstallArgs::class.java)
        implementation.install(context, args.path)
    }
}
